<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改通讯录')" />
	<th:block th:include="include :: summernote-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-notice-edit" th:object="${address}">
            <input id="id" name="id" th:field="*{id}"  type="hidden">
            <div class="form-group">	
                <label class="col-sm-2 control-label is-required">姓名：</label>
                <div class="col-sm-10">
                    <input id="name" name="name" th:field="*{name}" class="form-control" type="text" required>
                </div>
            </div>
<!--            <div class="form-group">-->
<!--				<label class="col-sm-2 control-label">部门：</label>-->
<!--				<div class="col-sm-10">-->
<!--					<select name="post" class="form-control m-b" th:with="type=${@dict.getType('oa_notice_level')}">-->
<!--	                    <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{level}"></option>-->
<!--	                </select>-->
<!--				</div>-->
<!--			</div>-->
            <div class="form-group">
                <label class="col-sm-2 control-label is-required">手机号：</label>
                <div class="col-sm-10">
                    <input id="mobile" name="mobile" th:field="*{mobile}" class="form-control" type="text" required>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label is-required">排序：</label>
                <div class="col-sm-10">
                    <input id="orderNum" name="orderNum" th:field="*{orderNum}" class="form-control" type="text" required>
                </div>
            </div>
		</form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: summernote-js" />
    <script type="text/javascript">
        var prefix = ctx + "address/book";
    
	    $(function() {
			var content = $("#content").val();
		    $('#editor').summernote('code', content);
	    });
	    
		$("#form-notice-edit").validate({
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	        	var sHTML = $('.summernote').summernote('code');
				$("#content").val(sHTML);
				$.operate.save(prefix + "/edit", $('#form-notice-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
